// 学校组织，如“人事部”，“教务部”等等
class Organize {
    String name = ''    
    String shortName = '' //
 
    def belongsTo = User

    Organize parent
    static hasMany = [users:User , children : Organize ]

    static constraints = {
		name(blank: false, size:0..250)
        shortName(blank: true, size:0..250)

        users(nullable: true)
        children(nullable: true)
 
    }

    static mapping = {
        sort  name : 'asc'
     } 

    String toString (){
        "$name"
    }
}
